module.exports = app => {
    const { STRING, INTEGER, DATE, BIGINT } = app.Sequelize;

    const Admin = app.model.define('admin', {
        admin_id: {
            type: BIGINT.UNSIGNED,
            primaryKey: true,
            autoIncrement: true,
        },
        admin_name: { type: STRING(50), allowNull: true },
        email: { type: STRING(20), allowNull: false, unique: true },
        password: { type: STRING(100), allowNull: false },
        created_at: DATE,
        updated_at: DATE,
    }, {
        tableName: 'admins',
        timestamps: false,
    });

    return Admin;
};